public class Learn18 {
    public static boolean judge(int[] array){
        int count = 0;
        for (int i = 0; i < array.length; i++) {
            if(array[i] % 2 != 0){
                count++;
                if(count == 3){
                    return true;
                }
            }else{
                count = 0;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[] array = {1,2,34,3,4,5,7,23,12};
        System.out.println(judge(array));       //检测是否存在连续三个奇数的数组
    }
}
